public class ForDemo1 {
    public static void main(String[] args) {
        //for(初始化语句；循环条件；迭代语句）
        //for循环快捷键fori

        //最常用
        System.out.println("----3次Hello World----");
        for (int i = 0; i < 3; i++) {
            //i = 0,i = 1,i = 2
            System.out.println("Hello World");
        }

        System.out.println("----4次Hello MySQL----");
        for (int i = 1; i < 5; i++) {
            //i = 1,i = 2,i = 4
            System.out.println("Hello MySQL");
        }

        System.out.println("----5次Hello Spring----");
        for (int i = 1; i <= 5; i++) {
            //i = 1,i = 2,i = 3,i = 4,i = 5
            System.out.println("Hello Spring");
        }

        System.out.println("----3次Hello Redis----");
        for (int i = 1; i <= 5; i += 2) {
            //i = 1,i = 3,i = 5
            System.out.println("Hello Redis");
        }
    }
}
